include <fitFunction.scad>

// set number of fragments(polygons) around circle
$fn = 180;

difference()
{
	cylinder(r = 14.4, h = 10, center = true);

	// gear mount bolt holes
	for(hole = [0 : 90 : 360])
	{
		rotate(hole + 45, [0,0,1])
		translate ([11.1, 0, 0])
		cylinder(r = fit(1.5), h = 12, center = true);
	}

	// center shaft hole
	cylinder(r = fit(8.475), h = 12, center = true);

	// hole for set screws
	rotate(90, [1,0,0])
	cylinder(r = fit(1.5), h = 30, center = true);

	// set screw bolt insets
	for(side = [-1, 1])
	{
		translate([0, side * 14.4 ,0])
		rotate(90, [0,1,0])
		rotate(90, [1,0,0])
		cylinder(r = fit(3.05), h = 3, center = true, $fn = 6);
	}
}